<?php header ( 'Content-type: text/xml' ) ?>
<?php echo '<?xml version="1.0" encoding="utf-8"?>' ?>

<menu>
    <node name="<?php echo $this->translate("Clients") ?>">
        <?php echo $this->menuItem($this->translate("Browse clients"), 'admin.client.browse', 'bottom') ?>
        <?php echo $this->menuItem($this->translate("Add new client"), 'admin.client.add', 'main') ?>
        <?php echo $this->menuItem($this->translate("Browse banks"), 'admin.bank.browse', 'bottom') ?>
        <?php echo $this->menuItem($this->translate("Add new bank"), 'admin.bank.add', 'main') ?>
        <?php echo $this->menuItem($this->translate("Browse stories"), 'admin.story.browse', 'bottom') ?>
        <?php echo $this->menuItem($this->translate("Browse business"), 'admin.business.browse', 'bottom') ?>
    </node>    
    <node name="<?php echo $this->translate("Loans") ?>">
        <node name="<?php echo $this->translate("Products") ?>"> 
            <?php echo $this->menuItem($this->translate("Browse products"), 'loan.loan-product.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Add new"), 'loan.loan-product.add', 'main') ?>
        </node>  
        <node name="<?php echo $this->translate("Active portfolio") ?>">
            <?php echo $this->menuItem($this->translate("Current"), 'loan.active-loan.browse', 'bottom', array('Status' => 'Current', 'Delinquent' => 0)) ?>
            <?php echo $this->menuItem($this->translate("Delinquent"), 'loan.active-loan.browse', 'bottom', array('Status' => 'Delinquent', 'Delinquent' => 1)) ?>
            <?php echo $this->menuItem($this->translate("Browse all"), 'loan.active-loan.browse', 'bottom') ?>
        </node>  
        <node name="<?php echo $this->translate("Legal portfolio") ?>"> 
            <?php echo $this->menuItem($this->translate("Written-Off"), 'loan.legal.browse', 'bottom', array('Status' => 'Written-Off')) ?>
            <?php echo $this->menuItem($this->translate("Recovered"), 'loan.legal.browse', 'bottom', array('Status' => 'Recovered')) ?>  
        </node>  
        <node name="<?php echo $this->translate("Applications") ?>"> 
            <?php echo $this->menuItem($this->translate("New"), 'loan.application.browse', 'bottom', array('Status' => 'New')) ?>
            <?php echo $this->menuItem($this->translate("Rejected"), 'loan.application.browse', 'bottom', array('Status' => 'Rejected')) ?>
            <?php echo $this->menuItem($this->translate("Submitted"), 'loan.application.browse', 'bottom', array('Status' => 'Submitted')) ?>
            <?php echo $this->menuItem($this->translate("Re-Submitted"), 'loan.application.browse', 'bottom', array('Status' => 'Re-Submitted')) ?>
            <?php echo $this->menuItem($this->translate("Reviewed"), 'loan.application.browse', 'bottom', array('Status' => 'Reviewed')) ?>
            <?php echo $this->menuItem($this->translate("Approved"), 'loan.application.browse', 'bottom', array('Status' => 'Approved')) ?>
            <?php echo $this->menuItem($this->translate("Executed"), 'loan.application.browse', 'bottom', array('Status' => 'Executed')) ?>
            <?php echo $this->menuItem($this->translate("Disbursed"), 'loan.application.browse', 'bottom', array('Status' => 'Disbursed')) ?>
            <?php echo $this->menuItem($this->translate("Withdrawn"), 'loan.application.browse', 'bottom', array('Status' => 'Withdrawn')) ?>
        </node>    
        <node name="<?php echo $this->translate("Archive") ?>"> 
            <?php echo $this->menuItem($this->translate("Paid"), 'loan.loan.browse', 'bottom', array('Status' => 'Paid')) ?>
            <?php echo $this->menuItem($this->translate("Withdrawn"), 'loan.loan.browse', 'bottom', array('Status' => 'Withdrawn')) ?>
            <?php echo $this->menuItem($this->translate("Browse all"), 'loan.loan.browse', 'bottom') ?>
        </node>      
        <?php echo $this->menuItem($this->translate("Financial calculator"), 'loan.calculator.index', 'main') ?>
    </node>  
    <node name="<?php echo $this->translate("Savings") ?>">
        <node name="<?php echo $this->translate("Products") ?>">
            <?php echo $this->menuItem($this->translate("Browse products"), 'savings.savings-product.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Add new product"), 'savings.savings-product.add', 'main') ?>
        </node>   
        <?php echo $this->menuItem($this->translate("Browse accounts"), 'savings.savings-account.browse', 'bottom') ?>
        <?php echo $this->menuItem($this->translate("Browse transactions"), 'savings.savings-transaction.browse', 'bottom') ?>
    </node>
    <node name="<?php echo $this->translate("Administration") ?>">
        <node name="<?php echo $this->translate("Roles and resources") ?>">
            <?php echo $this->menuItem($this->translate("Browse resources"), 'admin.resource.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Browse roles"), 'admin.role.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Add new role"), 'admin.role.add', 'main') ?>
        </node>
        <node name="<?php echo $this->translate("Business types") ?>">
            <?php echo $this->menuItem($this->translate("Browse business types"), 'admin.business-type.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Add new business type"), 'admin.business-type.add', 'main') ?>
        </node>        
        <node name="<?php echo $this->translate("Countries") ?>">
            <?php echo $this->menuItem($this->translate("Browse countries"), 'admin.country.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Add new country"), 'admin.country.add', 'main') ?>
        </node>
        <node name="<?php echo $this->translate("Currencies") ?>">
            <?php echo $this->menuItem($this->translate("Exchange rates"), 'admin.exchange-rate.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Browse currencies"), 'admin.currency.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Add new currency"), 'admin.currency.add', 'main') ?>
        </node>
        <node name="<?php echo $this->translate("Funds") ?>">
            <?php echo $this->menuItem($this->translate("Browse funds"), 'admin.fund.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Add new fund"), 'admin.fund.add', 'main') ?>
        </node>
        <node name="<?php echo $this->translate("Programs") ?>">
            <?php echo $this->menuItem($this->translate("Browse programs"), 'admin.program.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Add new program"), 'admin.program.add', 'main') ?>
        </node>
        <node name="<?php echo $this->translate("Product lines") ?>">
            <?php echo $this->menuItem($this->translate("Browse product lines"), 'admin.product-line.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Add new product line"), 'admin.product-line.add', 'main') ?>
        </node>
        <node name="<?php echo $this->translate("Locations") ?>">
            <?php echo $this->menuItem($this->translate("Browse locations"), 'admin.location.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Add new location"), 'admin.location.add', 'main') ?>
        </node>
        <node name="<?php echo $this->translate("Communities") ?>">
            <?php echo $this->menuItem($this->translate("Browse communities"), 'admin.community.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Add new community"), 'admin.community.add', 'main') ?>
        </node>                      
        <node name="<?php echo $this->translate("Users") ?>">
            <?php echo $this->menuItem($this->translate("Browse loan officers"), 'admin.officer.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Browse all users"), 'admin.user.browse', 'bottom') ?>
            <?php echo $this->menuItem($this->translate("Add new user"), 'admin.user.add', 'main') ?>
        </node>                       
        <node name="<?php echo $this->translate("Performance metrics") ?>">
            <node name="<?php echo $this->translate("Officers") ?>">
                <?php echo $this->menuItem($this->translate("Browse custom metrics"), 'admin.performance-metric-officer.browse', 'bottom') ?>
                <?php echo $this->menuItem($this->translate("Add custom metric"), 'admin.performance-metric-officer.add', 'main') ?>
            </node>
            <node name="<?php echo $this->translate("Branches") ?>">
                <?php echo $this->menuItem($this->translate("Browse custom metrics"), 'admin.performance-metric-location.browse', 'bottom') ?>
                <?php echo $this->menuItem($this->translate("Add custom metric"), 'admin.performance-metric-location.add', 'main') ?>
            </node>
            <node name="<?php echo $this->translate("Programs") ?>">
                <?php echo $this->menuItem($this->translate("Browse custom metrics"), 'admin.performance-metric-program.browse', 'bottom') ?>
                <?php echo $this->menuItem($this->translate("Add custom metric"), 'admin.performance-metric-program.add', 'main') ?>
            </node>
            <node name="<?php echo $this->translate("Lines") ?>">
                <?php echo $this->menuItem($this->translate("Browse custom metrics"), 'admin.performance-metric-line.browse', 'bottom') ?>
                <?php echo $this->menuItem($this->translate("Add custom metric"), 'admin.performance-metric-line.add', 'main') ?>
            </node>
            <?php echo $this->menuItem($this->translate("Browse defaults"), 'admin.performance-metric.browse', 'bottom') ?>
        </node>                     
        
    </node>
    <node name="<?php echo $this->translate("Partners") ?>">
        <?php echo $this->menuItem($this->translate("Browse partners"), 'sponsor.partner.browse', 'bottom') ?>
        <?php echo $this->menuItem($this->translate("Add new partner"), 'sponsor.partner.add', 'main') ?>
        <?php echo $this->menuItem($this->translate("Browse sponsors"), 'sponsor.sponsor.browse', 'bottom') ?>
        <?php echo $this->menuItem($this->translate("Add new sponsor"), 'sponsor.sponsor.add', 'main') ?>
        <?php echo $this->menuItem($this->translate("Browse donations"), 'sponsor.donation.browse', 'bottom') ?>
        <?php echo $this->menuItem($this->translate("Browse donation allocations"), 'sponsor.donation-allocation.browse', 'bottom') ?>
    </node>
    <node name="<?php echo $this->translate("Surveys") ?>">
        <?php echo $this->menuItem($this->translate("Browse surveys"), 'survey.survey.browse', 'bottom') ?>
    </node>
</menu>